const path = require('path');
const root = path.resolve(__dirname, '..');

module.exports = {
    entry: path.join(root, 'src/main.js'),
    output: {
        path: path.join(root),
        filename: 'dist/[name].js'
    },
    module: {
        loaders: [
            {
                test: /.vue$/,
                loader: 'vue-loader'
            },
            {
                test: /.js$/,
                loader: 'babel-loader',
                exclude: /node_modules/,
                query: {
                    presets: ['es2015']
                }
            }
        ]
    },
    resolve: {
        extensions: ['.js', '.vue']
    }
};